package com.youlai.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.youlai.system.common.model.Option;
import com.youlai.system.model.entity.SysMeasure;
import com.youlai.system.model.form.MeasureForm;
import com.youlai.system.model.query.MeasurePageQuery;
import com.youlai.system.model.vo.MeasurePageVO;

import java.util.List;

/**
 * 整改措施业务接口
 */
public interface SysMeasureService extends IService<SysMeasure> {

    /**
     * 根据整改措施内容查询对象
     *
     * @param content
     * @return
     */
    SysMeasure getByContentEqual(String content);

    /**
     * 根据整改措施内容保存对象
     *
     * @param content
     * @return
     */
    SysMeasure saveByContent(String content);


    /**
     * 整改措施分页列表
     *
     * @param queryParams
     * @return
     */
    Page<MeasurePageVO> getMeasurePage(MeasurePageQuery queryParams);

    /**
     * 保存整改措施
     *
     * @param measureForm
     * @return
     */
    boolean saveMeasure(MeasureForm measureForm);


    /**
     * 更新整改措施
     *
     * @param measureForm
     * @return
     */
    boolean updateMeasure(Long measureId, MeasureForm measureForm);

    /**
     * 查询单个整改措施
     *
     * @param measureId
     * @return
     */
    MeasureForm getMeasureForm(Long measureId);

    /**
     * 删除整改措施列表
     *
     * @param idsStr
     * @return
     */
    boolean deleteMeasures(String idsStr);

    /**
     * 删除整改措施列表
     *
     * @param idList
     * @return
     */
    boolean deleteMeasures(List<Long> idList);

    /**
     * 整改措施下拉列表
     *
     * @return
     */
    List<Option> listMeasureOptions();
}
